import { request } from './request';

export function goodsList(queryInfo) {
  return request({
    url: 'goods',
    params: queryInfo
  });
}

export function deleteGoods(goods_id) {
  return request({
    url: `goods/${goods_id}`,
    method: 'delete'
  });
}

export function addGoods(form) {
  return request({
    url: 'goods',
    method: 'post',
    data: form
  });
}

export function queryGoods(goods_id) {
  return request({
    url: `goods/${goods_id}`
  });
}

export function editGoodsSubmit(form) {
  return request({
    url: `goods/${form.goods_id}`,
    method: 'put',
    data: form
  });
}